/*
 * Copyright (C) 2017-2021
 * All rights reserved, Designed By
 * Copyright authorization contact 18814114118
 */
package com.shop.cereshop.app.controller.agreement;

import com.shop.cereshop.app.service.agreement.AgreementService;
import com.shop.cereshop.commons.constant.CoReturnFormat;
import com.shop.cereshop.commons.domain.agreement.Agreement;
import com.shop.cereshop.commons.result.Result;
import io.swagger.annotations.Api;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;


/**
 * <p>
 * 前端控制器
 * 协议表
 * </p>
 *
 * @author
 * @date 2025-07-29
 */
@Slf4j
@RestController
@RequestMapping("/agreement")
@Api(value = "Agreement", tags = "协议表")
public class AgreementController {

    @Resource
    private AgreementService agreementService;

    /**
     * 根据id查询 协议表
     *
     * @param id id
     * @return 协议内容
     */
    @GetMapping("getById")
    public Result<Agreement> getById(Long id) {
        /*
          1 用户协议
          2 隐私政策
          3 招住类型
          4 合作流程
         */
        return new Result(agreementService.getById(id),CoReturnFormat.SUCCESS);
    }

}
